<div style=" margin:10px;">
    <div class="notice">
        <strong><{t}>注意：<{/t}></strong><{t}>扫描图片分辨率请调整为 96 dpi，图片格式 jpg<{/t}>
    </div>
    <form id="form1" enctype="multipart/form-data" action="index.php?app=logisticsmanager&ctl=admin_express_template&act=doUploadBg" method="post">
        <{input type="sfile" id="f1" name="background" f_type="public"}>
        <input name="dly_printer_id" type="hidden" value="<{$dly_printer_id}>" />
        <{button label="上传" type="submit" id="btn-upload"}>
    </form>
</div>

<script>
(function(){
    $('btn-upload').addEvent('click',function(){return check();});

    function check(){
        var aaa = $(document.body).getElement("input[name=background]");
        if (aaa.value == ''){
            alert("请选择图片");
            return false;
        }
        return true;
    }
})()
</script>